// pages/select/select.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    animation:'',
    animationMin:'',
    backClass: ["red", "blue", "green", "orange"],
    currentItemId: 2,
    indicatorDots: false,
    autoplay: false,
    interval: 5000,
    duration: 1000,
  },
  onActiveUrl() {
    wx.navigateTo({
      url: '../select/select',
    })
  },
  swiperChange: function (e) {
    var currentItemId = e.detail.currentItemId;
    this.setData({
      currentItemId: currentItemId
    })
  },
  clickChange: function (e) {
    var itemId = e.currentTarget.dataset.itemId;
    this.setData({
      currentItemId: itemId
    })
    wx.navigateTo({
      url: '../training/training',
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    let animation = wx.createAnimation({

      duration: 200,
      timingFunction: "ease",
      delay: 0,
      transformOrigin: "50% 50%"
    })
    let animationMin = wx.createAnimation({

      duration: 200,
      timingFunction: "ease",
      delay: 0,
      transformOrigin: "50% 50%"
    })
    animation.scale(1).step();
    animationMin.scale(0.9).step(); 
    this.setData({
      animation: animation.export(),
      animationMin: animationMin.export(),
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})